#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

UPSTREAM_VERSION   := $(shell dpkg-parsechangelog | grep ^Version | sed -ne 's/^Version: //g' -e 's/-[^-]*$$//pg')
CURRENT := $(shell grep '^GTKHTML_CURRENT=' configure.in | sed -e 's/GTKHTML_CURRENT=//g')
AGE := $(shell grep '^GTKHTML_AGE=' configure.in | sed -e 's/GTKHTML_AGE=//g')
SOVERSION := $(shell expr ${CURRENT} - ${AGE})
TAG       := 3.8

#DEB_SHLIBDEPS_INCLUDE_gtkhtml${TAG} := $(CURDIR)/debian/libgtkhtml${TAG}-${SOVERSION}/usr/lib
#DEB_DH_MAKESHLIBS_ARGS_gtkhtml${TAG} := --noscripts
#DEB_SHLIBDEPS_INCLUDE_libgtkhtml${TAG}-dev := $(CURDIR)/debian/libgtkhtml${TAG}-${SOVERSION}/usr/lib
#DEB_DH_MAKESHLIBS_ARGS_libgtkhtml${TAG}-${SOVERSION} := -V 'libgtkhtml${TAG}-${SOVERSION} (>= ${UPSTREAM_VERSION})'
#DEB_INSTALL_DOCS_gtkhtml${TAG} := --no-act
#DEB_INSTALL_CHANGELOGS_gtkhtml${TAG} := --no-act
#DEB_INSTALL_DOCS_libgtkhtml${TAG}-dev := --no-act
#DEB_INSTALL_CHANGELOGS_libgtkhtml${TAG}-dev := --no-act

binary-post-install/gtkhtml-tidy::
	-rm $(CURDIR)/debian/gtkhtml-tidy/usr/lib/gtkhtml/*.la
	-rm $(CURDIR)/debian/gtkhtml-tidy/usr/lib/gtkhtml/*.a
